﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Test With Firebug</title>
	<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>
	<script src="RID.js" ></script>
</head>

<body>
请输入身份证号码:
<input id="rid" value='632801197908170036'/>
<button onclick="btnClickHandler()">验证</button>

<p>
点击验证 结果请看firebug的console(按下F12键)<br />
通过_rid 对象可以从firebug控制台中测试所有RID的方法, 例如:<br />
>>> _rid.getAddress()<br />
回车将返回:<br />
[ "青海省", "海西蒙古族藏族自治州", "格尔木市" ]
</p>

</body>
</html>
<script>
var _rid;
var btnClickHandler = function (){
//	_rid = new RID('632801790817003');	//15
//	_rid = new RID('632801197908170036');	//18
    
//	_rid = new RID('632801790931003');	//9月31日
//	_rid = new RID('632801791901003');	//19月31日
//	_rid = new RID('6328x1790817003');	//非数字
//	_rid = new RID('6328x1197908170036');	//非数字
//	_rid = new RID('932801790817003');	//地址码不存在
//	_rid = new RID('63280119790817003x');	//检验码不正确
	_rid = new RID(document.getElementById('rid').value,{trustedMaxValidDate:new Date()});	//检验码不正确
	console.log(_rid);
}

</script>